<template>
  <div>这个是about</div>
  <div>
    <router-link to="/myabout/about1">about1</router-link>
    <router-link to="/myabout/about2">about2</router-link>
  </div>
  <div>
    <router-view />
  </div>
</template>

<script setup lang="ts">
import { watch } from 'vue'
import { RouterLink, RouterView } from 'vue-router'

//监测路径变化
import { useRoute } from 'vue-router'
const route = useRoute()
watch(
  () => {
    return route.path
  },
  (path) => {
    console.log('路径', path)
  },
)
</script>

<style scoped></style>
